import time

class Logger:
    def __init__(self):
        self.last_print_time = 0  # 初始化为0
    
    def log(self, message):
        current_time = time.time()
        if current_time - self.last_print_time > 1:  # 至少间隔1秒打印一次
            print(message)
            self.last_print_time = current_time  # 更新最后打印时间

s=Logger()
while(1):
    s.log("1")